<!--
Copyright (C) 2012 Martin Řehánek <rehan at mzk.cz>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->
<!DOCTYPE html>
<html>
    <head>
        <title>playlist test</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <!--<link rel="stylesheet" type="text/css" href="css/360player.css"></link>-->
        <!--<link rel="myplayer" type="text/css" href="../css/my_player.css"></link>-->
        <link rel="stylesheet" type="text/css" href="http://localhost:8080/ClosureTest/css/test2.css"></link>
        <!--<link type="text/css" href="css/my_player.css"></link>-->
        <script src="http://localhost:9810/compile?id=audio&format=RAW"></script>
        <!--        <script src="soundmanager/script/soundmanager2.js"></script>-->
    </head>
    <body>
        <div id="playlist">Tady mame playlist</div>
        <script>
            //playlist
            var playlistContainer = goog.dom.getElement('playlist');
            var playlist= new kramerius.audio.ui.playlist.Playlist(playlistContainer, null);
            
            var audioProxyUrl = 'http://localhost:8080/K4AudioPOC/AudioServlet';
            var debugTrackBaseUrl = 'http://localhost/gramodesky/STALIN_shellack/';
            var trackFactory = new kramerius.audio.TrackFactory(audioProxyUrl, debugTrackBaseUrl);
            
            
            var testTrack = trackFactory.createTrack('uuid:STALIN_4-1', 'Stalin 4.1','1:12')
            console.log(testTrack);
            console.log(testTrack.urlArray());
            
            var item1 = new kramerius.audio.ui.playlist.Item(trackFactory.createTrack('uuid:STALIN_4-1', 'Stalin 4.1','1:12'));
            item1.appendToPlaylist(playlist);
            item1.setStatusActive();
            
            var item2 = new kramerius.audio.ui.playlist.Item(trackFactory.createTrack('uuid:STALIN_4-2', 'Stalin 4.2', '1:35'));
            item2.appendToPlaylist(playlist);
            item2.setStatusSelected();
            
            var item3 = new kramerius.audio.ui.playlist.Item(trackFactory.createTrack('uuid:STALIN_4-3', 'Stalin 4.3', '1:09'));
            item3.appendToPlaylist(playlist); 
            
            var item4 = new kramerius.audio.ui.playlist.Item(trackFactory.createTrack('uuid:STALIN_4-4', 'Stalin 4.4', '2:53'));
            item4.appendToPlaylist(playlist); 
            
            //debug items
            var item5 = new kramerius.audio.ui.playlist.Item(trackFactory.createDebugTrack('uuid:STALIN_4-3.d', 'Stalin 4.3-local', '1:09','STALIN_4_1.mp3', 'ogg/STALIN_4_1.ogg'));
            item5.appendToPlaylist(playlist); 
            
            var item6 = new kramerius.audio.ui.playlist.Item(trackFactory.createDebugTrack('uuid:STALIN_4-4.d', 'Stalin 4.4-local', '2:53','STALIN_4_2.mp3', 'ogg/STALIN_4_2.ogg'));
            item6.appendToPlaylist(playlist); 
            
            var testDebugTrack = trackFactory.createDebugTrack('uuid:STALIN_4-4.d', 'Stalin 4.4-local', '2:53','STALIN_4_2.mp3', 'ogg/STALIN_4_2.ogg');
            console.log(testDebugTrack);
            console.log(testDebugTrack.urlArray());
            
        </script>
    </body>
</html>
